import Vue from 'vue';
import VueRouter from 'vue-router';
import Add from '../views/files/add.vue';
import Edit from '../views/files/edit.vue';
import List from '../views/files/list.vue';

Vue.use (VueRouter);

const routes = [
  {
    path: '/',
    name: 'fileAdd',
    component: Add,
  },
  {
    path: '/list',
    name: 'fileList',
    component: List,
  },
  {
    path: '/edit',
    name: 'fileEdit',
    component: Edit,
  },
];

const router = new VueRouter ({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
});

export default router;
